package com.songcha.sakura.download.base

import android.os.Parcel
import android.os.Parcelable

open class DownloadOption() :Parcelable {
    //var baseUrl=""
    //最大同时下载数
    //var maxDownloadTaskCount=3
    //最大缓存队列数
    //var maxWaitQueueCount=10
    //文件保存路径
    var filePath: String=""
    //文件名
    var fileName: String=""
    //判断文件唯一标识
    var uuid=""


    constructor(parcel: Parcel) : this() {
        filePath = parcel.readString()?:""
        fileName = parcel.readString()?:""
        uuid = parcel.readString()?:""
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(filePath)
        parcel.writeString(fileName)
        parcel.writeString(uuid)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<DownloadOption> {
        override fun createFromParcel(parcel: Parcel): DownloadOption {
            return DownloadOption(parcel)
        }

        override fun newArray(size: Int): Array<DownloadOption?> {
            return arrayOfNulls(size)
        }
    }

}